package c.e.a.b.e.c;

import java.io.IOException;
import java.util.Arrays;
import java.util.Objects;

/* compiled from: com.google.android.gms:play-services-measurement-base@@18.0.0 */
public final class h7 extends f7<e7, e7> {
    public final /* synthetic */ Object a() {
        return e7.c();
    }

    public final /* synthetic */ void b(Object obj, int i, long j) {
        ((e7) obj).a(i << 3, Long.valueOf(j));
    }

    public final /* synthetic */ void c(Object obj, x7 x7Var) throws IOException {
        ((e7) obj).d(x7Var);
    }

    public final void d(Object obj, Object obj2) {
        ((u4) obj).zzb = (e7) obj2;
    }

    public final /* synthetic */ Object e(Object obj) {
        return ((u4) obj).zzb;
    }

    public final void f(Object obj, x7 x7Var) throws IOException {
        e7 e7Var = (e7) obj;
        Objects.requireNonNull(e7Var);
        Objects.requireNonNull(x7Var);
        for (int i = 0; i < e7Var.a; i++) {
            ((g4) x7Var).c(e7Var.b[i] >>> 3, e7Var.c[i]);
        }
    }

    public final Object g(Object obj, Object obj2) {
        e7 e7Var = (e7) obj;
        e7 e7Var2 = (e7) obj2;
        if (e7Var2.equals(e7.f)) {
            return e7Var;
        }
        int i = e7Var.a + e7Var2.a;
        int[] copyOf = Arrays.copyOf(e7Var.b, i);
        System.arraycopy(e7Var2.b, 0, copyOf, e7Var.a, e7Var2.a);
        Object[] copyOf2 = Arrays.copyOf(e7Var.c, i);
        System.arraycopy(e7Var2.c, 0, copyOf2, e7Var.a, e7Var2.a);
        return new e7(i, copyOf, copyOf2, true);
    }

    public final void h(Object obj) {
        ((u4) obj).zzb.e = false;
    }

    public final int i(Object obj) {
        e7 e7Var = (e7) obj;
        int i = e7Var.d;
        if (i != -1) {
            return i;
        }
        int i2 = 0;
        for (i = 0; i < e7Var.a; i++) {
            int L = e4.L(8) << 1;
            int M = e4.M(2, e7Var.b[i] >>> 3) + L;
            i2 += e4.w(3, (t3) e7Var.c[i]) + M;
        }
        e7Var.d = i2;
        return i2;
    }

    public final /* synthetic */ int j(Object obj) {
        return ((e7) obj).e();
    }
}
